<template>
	<view :class="[`${PREFIX}`]">
		<Card isPreview />
		<view :class="[`${PREFIX}-comment`]">
			<view :class="[`${PREFIX}-comment-block`]"></view>
			<view :class="[`${PREFIX}-comment-title`]">全部评论(2)</view>
			<view :class="[`${PREFIX}-comment-list`]">
				<view :class="[`${PREFIX}-comment-list-item`]">
					<image :class="[`${PREFIX}-comment-list-item-avatar`]" src="" mode=""></image>
					<view :class="[`${PREFIX}-comment-list-item-lines`]">
						<view :class="[`${PREFIX}-comment-list-item-lines-line1`]">
							<view :class="[`${PREFIX}-comment-list-item-lines-line1-left`]">
								子墨
								<view>作者</view>
							</view>
							<image :class="[`${PREFIX}-comment-list-item-lines-line1-right`]" src="/static/home/like3.png" mode=""></image>
						</view>
						<view :class="[`${PREFIX}-comment-list-item-lines-line2`]">
							诸事顺利诸事顺利诸诸事顺利诸事顺利诸诸事顺利诸事顺利诸诸事顺利诸事顺利诸诸事顺利诸事顺利诸诸事顺利诸事顺利诸
						</view>
						<view :class="[`${PREFIX}-comment-list-item-lines-line3`]">
							5小时前<view>回复</view>
						</view>
						<view :class="[`${PREFIX}-comment-list-item-child`]">
							<image :class="[`${PREFIX}-comment-list-item-child-avatar`]" src="" mode=""></image>
							<view :class="[`${PREFIX}-comment-list-item-lines`]">
								<view :class="[`${PREFIX}-comment-list-item-lines-line1`]">
									<view :class="[`${PREFIX}-comment-list-item-lines-line1-left`]">
										子墨
									</view>
									<image :class="[`${PREFIX}-comment-list-item-lines-line1-right`]" src="/static/home/like1.png" mode="">
									</image>
								</view>
								<view :class="[`${PREFIX}-comment-list-item-lines-line2`]">
									诸事顺利诸事顺利诸诸事顺利诸事顺利诸诸事顺利诸事顺利诸诸事顺利诸事顺利诸诸事顺利诸事顺利诸诸事顺利诸事顺利诸
								</view>
								<view :class="[`${PREFIX}-comment-list-item-lines-line3`]">
									5小时前<view>回复</view>
								</view>
							</view>
						</view>
					</view>

				</view>
			</view>
		</view>
		<view :class="[`${PREFIX}-input`]">
			<image :class="[`${PREFIX}-input-img1`]" src="" mode=""></image>
			<input :class="[`${PREFIX}-input-input`]" type="text" placeholder="点击发送一条评论" @focus="focus" @blur="blur">
			<image :class="[`${PREFIX}-input-img2`]" v-if="!isFocus" src="" mode=""></image>
			<view :class="[`${PREFIX}-input-comment`]">评论</view>
		</view>
		<!-- <Comment /> -->
	</view>
</template>
<script>
	const PREFIX = 'home-detail'
	import Card from './components/Card.vue'
	import Comment from './components/Comment.vue'
	export default {
		data() {
			return {
				PREFIX,
				isFocus: false
			}
		},
		components: {
			Card,
			Comment
		},
		methods: {
			focus(){
				this.isFocus = true
			},
			blur(){
				this.isFocus = false
			}
		}
	}
</script>
<style lang="less">
	page {
		height: 100%;
	}

	.home-detail {
		height: 100%;

		&-comment {
			background: #fff;
			box-sizing: border-box;
			padding-bottom: 160rpx;

			&-block {
				height: 10rpx;
				background: #f4f2f2;

			}

			&-title {
				height: 34rpx;
				color: #333333;
				text-align: left;
				font-size: 36rpx;
				line-height: 34rpx;
				letter-spacing: 0.3px;
				padding: 30rpx 0 34rpx 40rpx;
			}

			&-list {
				&-item {
					display: flex;
					padding: 0 50rpx 0 40rpx;

					&-avatar {
						width: 80rpx;
						height: 80rpx;
						background: blue;
						border-radius: 50%;
						margin-right: 32rpx;
						flex-shrink: 0;
					}


					display: flex;

					&-lines {
						width: 100%;
						display: flex;
						flex-direction: column;

						&-line1 {
							display: flex;
							justify-content: space-between;
							align-items: center;
							height: 34rpx;
							color: #666666;
							font-size: 32rpx;
							line-height: 34rpx;

							&-left {
								display: flex;

								view {
									width: 92rpx;
									height: 40rpx;
									display: flex;
									justify-content: center;
									align-items: center;
									border-radius: 20rpx;

									background: #7355ff;
									color: #fff;
									font-size: 24rpx;
									margin-left: 36rpx;
								}
							}

							&-right {
								width: 40rpx;
								height: 40rpx;
							}
						}

						&-line2 {
							opacity: 1;
							color: #333333;
							font-size: 36rpx;
							line-height: 40rpx;
							margin: 24rpx 0;
						}

						&-line3 {
							display: flex;
							height: 34rpx;
							color: #999999;
							font-size: 32rpx;
							line-height: 40rpx;

							view {
								margin-left: 46rpx;
							}

						}
					}

					&-child {
						display: flex;
						margin-top: 64rpx;

						&-avatar {
							width: 48rpx;
							height: 48rpx;
							background: blue;
						}
					}
				}
			}
		}

		&-input {
			width: 100%;
			height: 152rpx;
			box-sizing: border-box;
			background: #fff;
			position: fixed;
			bottom: 0;
			display: flex;
			justify-content: center;
			align-items: center;
			padding: 0 32rpx 0 24rpx;

			&-img1 {
				width: 52rpx;
				height: 52rpx;
				background: blue;
			}

			&-input {
				flex: 1;
				height: 72rpx;
				background: #F2F3F7;
				border-radius: 36rpx;
				margin: 0 20rpx 0 14rpx;
				padding-left: 32rpx;
				color: #c0c2cb;
			}

			&-img2 {
				width: 60rpx;
				height: 60rpx;
				background: blue;
			}

			&-comment {
				width: 128rpx;
				height: 55rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				border-radius: 27rpx;
				background: #7355ff;
				color: #ffffff;
				text-align: center;
				font-size: 30rpx;
				margin-left: 20rpx;
			}

		}
	}
</style>